package com.xjy.rpc.netty.promise;

import com.xjy.rpc.netty.message.RpcResponse;
import io.netty.util.concurrent.Promise;

import java.util.concurrent.TimeUnit;

public class RpcFuture <T>{

    private Promise<T> promise;

    private int expireTime;

    private TimeUnit timeUnit;


    public RpcFuture(Promise<T> res){
        this.promise = res;
    }

    public RpcFuture(Promise<T> res,int expireTime,TimeUnit unit){
        this.promise = res;
        this.expireTime = expireTime;
        this.timeUnit = unit;
    }

    public Promise<T> getPromise() {
        return promise;
    }

    public void setPromise(Promise<T> promise) {
        this.promise = promise;
    }
}
